﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;

namespace FastCodeGeneration.Entity
{

    [SugarTable("Template")]//当和数据库名称不一样可以设置表别名 指定表明
    public class Template
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)]//数据库是自增才配自增 
        public int? Id { get; set; }


        /// <summary>
        /// 项目id
        /// </summary>
        [SugarColumn(ColumnName = "project_id")]
        public int? ProjectId { set; get; }
        /// <summary>
        /// 模板名
        /// </summary>
        [SugarColumn(ColumnName = "name")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 模板key
        /// </summary>
        [SugarColumn(ColumnName = "template_key")]
        public string TemplateKey { set; get; } = string.Empty;

        /// <summary>
        /// 模板类型 JAVA || CSharp
        /// </summary>
        [SugarColumn(ColumnName = "template_type")]
        public string TemplateType { set; get; } = string.Empty;

        /// <summary>
        /// 模板内容
        /// </summary>
        [SugarColumn(ColumnName = "body")]
        public string Body { get; set; } = string.Empty;

        /// <summary>
        /// 创建人
        /// </summary>
        [SugarColumn(ColumnName = "create_by")]
        public string CreateBy { set; get; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "create_date")]
        public DateTime? CreateDate { set; get; }

        [SugarColumn(IsIgnore = true)]//数据库是自增才配自增 
        public string ProjectName { set; get; } = string.Empty;

    }
}
